import request from '@/utils/request'

// 查询学生课程
export function getStuCourse(params) {
  return request({
    url: '/administrator/student/course',
    method: 'get',
    params
  })
}

// 查询公共选修课
export function publicCourse(params) {
  return request({
    url: '/administrator/teacher/school/course',
    method: 'get',
    params
  })
}

// 删除公共选修课
export function deletePublicCou(data) {
  return request({
    url: `/administrator/teacher/school/course/${data}`,
    method: 'delete',
  })
}

// 更新/新增公共选修课
export function updatePublicCou(data) {
  return request({
    url: '/administrator/teacher/school/course',
    method: 'put',
    data
  })
}

// 根据条件查询教师课程
export function getTeaCourse(params) {
  return request({
    url: '/administrator/teacher/course',
    method: 'get',
    params
  })
}

// 根据课程查询学生信息
export function getCourseStu(params, id) {
  return request({
    url: `/administrator/teacher/student/${id}`,
    method: 'get',
    params
  })
}
